#include <bits/stdc++.h>
// 2025/02/05
// tag:
// Author: Zhang Muen
using namespace std;

using int64 = int64_t;

struct node {
    int w, v;
} file[1001];

int n, p, S, dp[1001];

bool check(int s)
{
    memset(dp, 0, sizeof(dp));
    for (int i = 1; i <= n && file[i].w <= s; ++i)
        for (int j = S; j >= file[i].w; --j)
            dp[j] = max(dp[j], dp[j - file[i].w] + file[i].v);
    return dp[S] >= p;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n >> p >> S;
    for (int i = 1; i <= n; ++i)
        cin >> file[i].w >> file[i].v;
    sort(file + 1, file + n + 1, [](node a, node b) {
        return a.w < b.w;
    });
    int l = 0, r = 1000;
    while (l <= r){
        int mid = (l + r) / 2;
        if (check(mid))
            r = mid - 1;
        else
            l = mid + 1;
    }
    if (l > 1000)
        cout << "No Solution!" << endl;
    else
        cout << l << endl;
    return 0;
}